package com.atguigu.auth.service.impl;

import com.atguigu.auth.mapper.SysPostMapper;
import com.atguigu.auth.service.SysPostService;
import com.atguigu.model.system.SysPost;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 * 岗位信息表 服务实现类
 * </p>
 *
 * @author rich
 * @since 2023-09-24
 */
@Service
public class SysPostServiceImpl extends ServiceImpl<SysPostMapper, SysPost> implements SysPostService {

    @Resource
    private SysPostMapper sysPostMapper;

    //更新状态
    @Override
    public void updateStatus(Long id, Integer status) {
        SysPost sysPost = sysPostMapper.selectById(id);
        sysPost.setStatus(status);
        sysPostMapper.updateById(sysPost);
    }
}
